package cn.iocoder.yudao.module.dating.dal.mysql.smallNote;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.dating.controller.admin.smallNote.vo.SmallNoteLogPageReqVO;
import cn.iocoder.yudao.module.dating.dal.dataobject.smallNote.SmallNoteLogDO;
import org.apache.ibatis.annotations.Mapper;

/**
 * <p>  </p>
 */
@Mapper
public interface SmallNoteLogMapper extends BaseMapperX<SmallNoteLogDO> {
    default PageResult<SmallNoteLogDO> selectPage(SmallNoteLogPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<SmallNoteLogDO>()
                .eqIfPresent(SmallNoteLogDO::getUserId, reqVO.getUserId())
                .eqIfPresent(SmallNoteLogDO::getSex, reqVO.getSex())
                .eqIfPresent(SmallNoteLogDO::getImages, reqVO.getImages())
                .eqIfPresent(SmallNoteLogDO::getAccount, reqVO.getAccount())
                .eqIfPresent(SmallNoteLogDO::getAccountImg, reqVO.getAccountImg())
                .eqIfPresent(SmallNoteLogDO::getDesp, reqVO.getDesp())
                .eqIfPresent(SmallNoteLogDO::getBoxType, reqVO.getBoxType())
                .eqIfPresent(SmallNoteLogDO::getProvince, reqVO.getProvince())
                .eqIfPresent(SmallNoteLogDO::getCity, reqVO.getCity())
                .eqIfPresent(SmallNoteLogDO::getArea, reqVO.getArea())
                .eqIfPresent(SmallNoteLogDO::getConditions, reqVO.getConditions())
                .eqIfPresent(SmallNoteLogDO::getFee, reqVO.getFee())
                .eqIfPresent(SmallNoteLogDO::getNoteId, reqVO.getNoteId())
                .eqIfPresent(SmallNoteLogDO::getTakeUserId, reqVO.getTakeUserId())
                .eqIfPresent(SmallNoteLogDO::getHighFlag, reqVO.getHighFlag())
                .eqIfPresent(SmallNoteLogDO::getStatusFlag, reqVO.getStatusFlag())
                .betweenIfPresent(SmallNoteLogDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(SmallNoteLogDO::getId));
    }
}
